<?php
    session_start();
    include('top.php');
    $uid = $_SESSION['id'];
    $point = "select * from user where id = $uid";
    $point_result = $link->query($point);
?>

    <div class="home-body">
        <?php include('info.php'); ?>

            <div class="home-container-body">
                <div class="home-side-by-side-start">
                    <?php while($point_row = mysqli_fetch_array($point_result)) { if (empty($point_row['speciality'])) { echo "尚未选择专业"; } else {?>
                    <div class="my-container">
                        <div class="red-div">
                            <?php
                                echo $point_row['speciality'];
                            ?>
                        </div>
                        <div class="white-div">
                            <div class="point-container">
                                <div class="outer-div">
                                    <div class="inner-div-top">资格审查</div>
                                    <div class="inner-div" style="<?php if (empty($point_row['first'])) { ?> background-color: #fff; <?php } else { if ($point_row['first'] > 60) { ?> background-color: #dbf6ea; <?php } else { ?> background-color: #fde9f2; <?php } } ?>">
                                        <?php if (empty($point_row['first'])) { ?>
                                        <span style="color: #f7972a;">资格尚未审查</span>
                                        <?php } else { if ($point_row['first'] > 60) { ?>
                                        <span style="color: #6dbc37;">资格审查通过</span>
                                        <?php } else { ?>
                                        <span style="color: #dd4b4d;">资格审未通过</span>
                                        <p style="color: #dd4b4d;"><?php echo $point_row['why']; ?>，请修改个人信息后再次提交报名专业。</p>
                                        <?php } } ?>
                                    </div>
                                </div>
                                <?php if ($point_row['first'] > 60) { ?>
                                <div class="outer-div">
                                    <div class="inner-div-top">招生考试</div>
                                    <div class="inner-div" style="<?php if (empty($point_row['second'])) { ?> background-color: #fff; <?php } else { if ($point_row['second'] > 60) { ?> background-color: #dbf6ea; <?php } else { ?> background-color: #fde9f2; <?php } } ?>">
                                        <?php if (empty($point_row['second'])) { ?>
                                        <span style="color: #f7972a;">未参加考试</span>
                                        <?php } else { if ($point_row['second'] > 60) { ?>
                                        <span style="color: #6dbc37;">考试通过：<?php echo $point_row['second']; ?>分</span>
                                        <?php } else { ?>
                                        <span style="color: #dd4b4d;">考试未通过：<?php echo $point_row['second']; ?>分</span>
                                        <?php } } ?>
                                    </div>
                                </div>
                                <?php } else {} ?>
                            </div>
                        </div>
                    </div>
                    <?php } } ?>
                </div>
            </div>
    </div>

    <?php include('bottom.php'); ?>